package com.tuozixuan.example2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.statemachine.StateMachine;
import org.springframework.stereotype.Component;

@Component
public class Example2Test implements CommandLineRunner {
	
	@Autowired
	private StateMachine<String, String> stateMachine;

	@Override
	public void run(String... args) throws Exception {
		 stateMachine.sendEvent("E1");
		 stateMachine.sendEvent("E2");
		 stateMachine.sendEvent("EF");
	}

}
